import request from '@/utils/request'

enum API {
  skuList = '/admin/product/list/',
  cancelSale = 'admin/product/cancelSale/',
  onSale = '/admin/product/onSale/',
  getSkuInfo = '/admin/product/getSkuInfo/',
  deleteSku = '/admin/product/deleteSku/',
}
//分页列表
export const reqSkuList = (page: any, limit: any) =>
  request.get(API.skuList + `${page}/${limit}`)
//下架
export const reqCancelSale = (skuId: any) => request.get(API.cancelSale + skuId)
//上架
export const reqOnSale = (skuId: any) => request.get(API.onSale + skuId)
//详情
export const reqSkuInfo = (skuId: any) => request.get(API.getSkuInfo + skuId)
//删除
export const reqDeleteSku = (skuId: any) =>
  request.delete(API.deleteSku + skuId)
